/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.easoft.code.pos.ui.bind;

import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import javax.swing.JComponent;

/**
 *
 * @author Eliu
 */
public class UICallBackManager {

    public static void attachCallBack(JComponent c, final UICallBackConfig cfg) {
        c.addFocusListener(new FocusAdapter() {

            @Override
            public void focusLost(FocusEvent e) {
                cfg.call();
            }

        });
    }
}
